// JavaScript Document 
var login = $('.login');

var regist = $('.regist');

var name = document.getElementsByName('username');

$().ready(function() {
// 在键盘按下并释放及提交后验证提交表单
$("#registform").validate({
	rules: {
	  username:{
		  required:true,
		  minlength:2
	  },
		password:{
			required:true,
			minlength:6
		},
		confirm_password:{
			required:true,
			minlength:6,
			equalTo: "#password"
		}
	},
	messages: {
	 username:{
		 required:"请输入用户名",
		 minlength:"用户名不得少于两位"
	 },
		password:{
			required:"请输入密码",
			minlength:"密码不得少于六位"
		},
		confirm_password:{
			required:"请输入密码",
			minlength:"密码不得少于六位",
			equalTo: "两次输入的密码不一致"
		}
	}
});
});
